#include "Controller.h"

Controller::Controller(RenderWidget* view, QObject* parent)
    : QObject(parent)
    , m_view(view)
{
}

void Controller::onAddVectors(float x1, float y1, float x2, float y2) {
    // 调用 RenderWidget 提供的 API
    m_view->showVectorSum({ x1, y1 }, { x2, y2 });
}

void Controller::onTransformMatrix(float a11, float a12, float a21, float a22) {
    // 调用 RenderWidget 提供的 API
    m_view->showMatrixTransform({ a11, a12, a21, a22 });
}
